<!DOCTYPE html>
<html>
  <head>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script
      async
      src="https://www.googletagmanager.com/gtag/js?id=UA-162048272-1"
    ></script>
    <script>
      window.dataLayer = window.dataLayer || [];

      function gtag() {
        dataLayer.push(arguments);
      }

      gtag("js", new Date());
      gtag("config", "UA-162048272-1");
    </script>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Zipcall</title>
    <link rel="shortcut icon" href="/images/logo.svg" />
    <link rel="stylesheet" href="../css/chat.css" />
    <link rel="stylesheet" href="../css/snackbar.css" />
    <script
      src="https://kit.fontawesome.com/9d7bb7e31a.js"
      crossorigin="anonymous"
    ></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
    <script src="/js/jquery.ui.touch-punch.js"></script>
    <meta property="og:title" content="Join your friends call - Zipcall" />
    <meta
      property="og:description"
      content="Click the link to join this call using Zipcall"
    />
    <meta property="og:image" content="https://zipcall.io/images/preview.png" />
    <meta property="og:url" content="https://zipcall.io/" />
  </head>
  <body id="body" onresize="windowResized()">
    <div id="header">
      <a target="_blank" href="/">
        <img src="/images/logo.svg" alt="Neon" width="48" height="48" />
        <p>Zipcall</p>
      </a>
    </div>

    <p id="remote-video-text"></p>
    <video id="remote-video" autoplay playsinline></video>
    <div id="moveable">
      <p id="local-video-text">No webcam input</p>
      <video id="local-video" autoplay muted playsinline></video>
    </div>

    <div id="entire-chat">
      <div id="chat-zone">
        <div class="chat-messages"></div>
      </div>
      <form class="compose">
        <input type="text" placeholder="Type a message" />
      </form>
    </div>

    <div class="multi-button">
      <div class="buttonContainer">
        <button class="hoverButton" onclick="{muteMicrophone()}">
          <i id="mic-icon" class="fas fa-microphone fa-xs"></i>
        </button>
        <div class="HoverState" id="mic-text">Mute</div>
      </div>

      <!--      <div class="buttonContainer">-->
      <!--        <button class="hoverButton" onclick="{openFullscreen()}">-->
      <!--          <i class="fas fa-compress fa-xs"></i>-->
      <!--        </button>-->
      <!--        <div class="HoverState">Fullscreen</div>-->
      <!--      </div>-->

      <div class="buttonContainer">
        <button class="hoverButton" onclick="{pauseVideo()}">
          <i class="fas fa-video fa-xs" id="video-icon"></i>
        </button>
        <div class="HoverState" id="video-text">Pause Video</div>
      </div>

      <div class="buttonContainer">
        <button class="hoverButton" id="share-button" onclick="{swap()}">
          <i id="swap-icon" class="fas fa-desktop fa-xs"></i>
        </button>
        <div class="HoverState" id="swap-text">Share Screen</div>
      </div>

      <div class="buttonContainer">
        <button class="hoverButton" onclick="{toggleChat()}">
          <i id="chat-icon" class="fas fa-comment fa-xs"></i>
        </button>
        <div class="HoverState" id="chat-text">Show Chat</div>
      </div>

      <div class="buttonContainer">
        <button
          class="hoverButton"
          id="pip-button"
          onclick="{togglePictureInPicture()}"
        >
          <i class="fas fa-external-link-alt fa-xs"></i>
        </button>
        <div class="HoverState" id="pip-text">Toggle Picture in Picture</div>
      </div>

      <div class="buttonContainer">
        <button class="hoverButton" onclick="{requestToggleCaptions()}">
          <i class="fas fa-closed-captioning fa-xs"></i>
        </button>
        <div class="HoverState" id="caption-button-text">
          Start Live Caption
        </div>
      </div>

      <div class="buttonContainer">
        <button
          class="hoverButton"
          onclick="{window.location.href = '/newcall'}"
        >
          <i class="fas fa-phone-slash fa-xs"></i>
        </button>
        <div class="HoverState">End Call</div>
      </div>
    </div>

    <script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
    <script src="/socket.io/socket.io.js"></script>
    <script src="../js/snackbar.js"></script>
    <script src="../js/autolink.js"></script>
    <script src="https://cdn.rawgit.com/muaz-khan/DetectRTC/master/DetectRTC.js"></script>
    <script id="chatJS" src="../js/chat.js"></script>
  </body>
</html>
